package com.wqc;

import com.wqc.ioc.Manger;
import com.wqc.model.Print;
import com.wqc.model.TestBean;
import org.springframework.cglib.core.DebuggingClassWriter;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Properties;

public class App {
    public static void main(String[] args) {

        // 保存操作
        Properties properties = System.getProperties();
        properties.put("sun.misc.ProxyGenerator.saveGeneratedFiles","true");

        System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "D:\\Workspace\\Idea\\springbase-stu");

        ApplicationContext context = new ClassPathXmlApplicationContext("spring/applicationContext.xml");
        //Print testBean = (Print) context.getBean("test");
        //testBean.printClassName();

        Manger manger = (Manger) context.getBean("manger");
        System.out.println(manger.toString());
        //System.out.println(testBean.getTestStr());
    }
}
